﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProjetDll
{
    public class Event
    {

        #region Champs

        private string _id = "Inconnu";

        private string _title = "Inconnu";

        private string _image = "Inconnue";

        private string _date = "Inconnue";

        private string _description = "Inconnue";

        private string _link = "Inconnu";

        private List<Artist> _lesArtists = new List<Artist>();

        private Artist _theArtist;

        private Venue _venue = new Venue();

        private string _location = "Inconnu";

        private string _artist = "Inconnu";

        #endregion

        #region Propriétés

        /// <summary>
        /// Id de l'event
        /// </summary>
        public string id
        {
            get { return _id; }
            set { _id = value; }
        }

        /// <summary>
        /// Titre de l'event
        /// </summary>
        public string title
        {
            get { return _title; }
            private set { _title = value; }
        }

        public string artist
        {
            get { return _artist; }
            private set { _artist = value; }
        }

        /// <summary>
        /// Image de l'event
        /// </summary>
        public string image
        {
            get { return _image; }
            private set { _image = value; }
        }

        /// <summary>
        /// Date de l'event
        /// </summary>
        public string date
        {
            get { return _date; }
            private set { _date = value; }
        }

        /// <summary>
        /// Description de l'event
        /// </summary>
        public string description
        {
            get { return _description; }
            private set { _description = value; }
        }

        /// <summary>
        /// Lien de l'event
        /// </summary>
        public string link
        {
            get { return _link; }
            private set { _link = value; }
        }

        /// <summary>
        /// Liste des artistes présents
        /// </summary>
        public List<Artist> lesArtists
        {
            get { return _lesArtists; }
            internal set { _lesArtists = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        public Artist theArtist
        {
            get { return _theArtist; }
            private set { _theArtist = value; }
        }

        /// <summary>
        /// Venue
        /// </summary>
        public Venue venue
        {
            get { return _venue; }
            private set { _venue = value; }
        }

        /// <summary>
        /// Location
        /// </summary>
        public string location
        {
            get { return _location; }
            private set { _location = value; }
        }

        #endregion

        #region Méthodes

        /// <summary>
        ///  Initialise une nouvelle instance de la classe Event. Les propriétés de l'event ne peuvent pas être modifiées par la suite.
        /// </summary>
        public Event()
        {
        }

        /// <summary>
        ///  Initialise une nouvelle instance de la classe Event. Les propriétés de l'event ne peuvent pas être modifiées par la suite.
        /// </summary>
        /// <param name="id"></param>
        /// <param name="title"></param>
        /// <param name="description"></param>
        /// <param name="date"></param>
        public Event(string id, string title, string description, string date)
        {
            this.id = id;
            this.title = title;
            this.description = description;
            this.date = date;
        }

        /// <summary>
        ///  Initialise une nouvelle instance de la classe Event. Les propriétés de l'event ne peuvent pas être modifiées par la suite.
        /// </summary>
        /// <param name="id"></param>
        /// <param name="title"></param>
        /// <param name="description"></param>
        /// <param name="date"></param>
        /// <param name="image"></param>
        public Event(string id, string title, string description, string date, string image)
        {
            this.id = id;
            this.title = title;
            this.description = description;
            this.date = date;
            this.image = image;
        }

        /// <summary>
        ///  Initialise une nouvelle instance de la classe Event. Les propriétés de l'event ne peuvent pas être modifiées par la suite.
        /// </summary>
        /// <param name="id"></param>
        /// <param name="title"></param>
        /// <param name="description"></param>
        /// <param name="date"></param>
        /// <param name="image"></param>
        /// <param name="link"></param>
        public Event(string id, string title, string description, string date, string image, string link)
        {
            this.id = id;
            this.title = title;
            this.description = description;
            this.date = date;
            this.image = image;
            this.link = link;
        }

        /// <summary>
        /// Initialise une nouvelle instance de la classe Event. Les propriétés de l'event ne peuvent pas être modifiées par la suite.
        /// </summary>
        /// <param name="id"></param>
        /// <param name="title"></param>
        /// <param name="description"></param>
        /// <param name="date"></param>
        /// <param name="image"></param>
        /// <param name="theArtist"></param>
        public Event(string id, string title, string description, string date, string image, Artist theArtist)
        {
            this.id = id;
            this.title = title;
            this.description = description;
            this.date = date;
            this.image = image;
            this.theArtist = theArtist; 
        }

        public Event(string id, string title, string description, string date, string image, Venue venue, Artist theArtist)
        {
            this.id = id;
            this.title = title;
            this.description = description;
            this.date = date;
            this.image = image;
            this.venue = venue;
            this.theArtist = theArtist;
        }

        public Event(string id, string title, string description, string date, string image, Venue venue, string artist)
        {
            this.id = id;
            this.title = title;
            this.description = description;
            this.date = date;
            this.image = image;
            this.venue = venue;
            this.artist = artist;
        }
        /// <summary>
        ///  Initialise une nouvelle instance de la classe Event. Les propriétés de l'event ne peuvent pas être modifiées par la suite.
        /// </summary>
        /// <param name="id"></param>
        /// <param name="title"></param>
        /// <param name="description"></param>
        /// <param name="date"></param>
        /// <param name="image"></param>
        /// <param name="theLocalisation"></param>
        public Event(string id, string title, string description, string date, string image, Venue venue)
        {
            this.id = id;
            this.title = title;
            this.description = description;
            this.date = date;
            this.image = image;
            this.venue = venue;
        }

        public Event(string id, string title, string description, string date, string image, Venue venue, string location, Artist theArtist)
        {
            this.id = id;
            this.title = title;
            this.description = description;
            this.date = date;
            this.image = image;
            this.venue = venue;
            this.location = location;
            this.theArtist = theArtist;
        }

        /// <summary>
        /// Ajoute un artiste à un event 
        /// </summary>
        /// <param name="unArtist"></param>
        /// <param name="unEvent"></param>
        public void addArtistEvent(Artist unArtist, Event unEvent)
        {
            if (lesArtists == null)
                lesArtists = new List<Artist>();
            lesArtists.Add(unArtist);
        }

        #endregion

        #region Accesseurs

        /// <summary>
        /// Retourne les artistes
        /// </summary>
        /// <returns></returns>
        public List<Artist> getLesArtists()
        {
            return lesArtists;
        }

        #endregion

    }
}
